This is an example on how to use a DataLoader object
In [1]:
from __future__ import division
from terminaltables import AsciiTable
In [2]:
import inet
inet.__version__
Out[2]:
In [3]:
from inet import DataLoader
In [4]:
mydataset = DataLoader('../../data/PV') # create an object with information of all connections
In [5]:
len(mydataset.experiment)
Out[5]:
In [6]:
mydataset.nIN, mydataset.nPC # number of PV cells and GC cells recorded
Out[6]:
In [7]:
mydataset.configuration # number of recording configurations
Out[7]:
In [8]:
print(mydataset.motif) # number of connections tested and found for every type
Details of every experiments are given in a list
In [9]:
mydataset.experiment[0] # example of the data from the first experiment
Out[9]:
and details fo the recording configurations are provided
In [10]:
mydataset.experiment[12]['fname'] # mydataset.filename(12)
Out[10]:
In [11]:
mydataset.filename(12)
Out[11]:
In [12]:
mydataset.experiment[12]['matrix']
Out[12]:
In [13]:
mydataset.matrix(12)
Out[13]:
In [14]:
print(mydataset.experiment[12]['motif'])
In [15]:
mydataset.motifs(12)
Out[15]:
or the type the number of configurations when two PV-positive cells were recorded
In [16]:
mydataset.IN[2]
Out[16]:
In [17]:
y = mydataset.stats()
print AsciiTable(y).table
In [18]:
mymotifs = mydataset.motif
info = [
['Connection type', 'Value'],
['PV-PV chemical synapses', mymotifs.ii_chem_found],
['PV-PV electrical synapses', mymotifs.ii_elec_found],
[' ',' '],
['PV-PV bidirectional chemical', mymotifs.ii_c2_found],
['PV-PV divergent chemical', mymotifs.ii_div_found],
['PV-PV convergent chemical', mymotifs.ii_con_found],
['PV-PV linear chemical', mymotifs.ii_lin_found],
[''],
['PV-PV one chemical with electrical', mymotifs.ii_c1e_found],
['PV-PV bidirectional chemical with electrical', mymotifs.ii_c2e_found],
[' ',' '],
['P(PV-PV) chemical synapse', mymotifs.ii_chem_found/mymotifs.ii_chem_tested],
['P(PV-PV) electrical synapse', mymotifs.ii_elec_found/mymotifs.ii_elec_tested],
[''],
['P(PV-PV) bidirectional chemical synapse', mymotifs.ii_c2_found/mymotifs.ii_c2_tested],
['P(div) divergent chemical motifs', mymotifs.ii_div_found/mymotifs.ii_div_tested],
['P(div) convergent chemical motifs', mymotifs.ii_con_found/mymotifs.ii_con_tested],
['P(chain) linear chain motifs', mymotifs.ii_lin_found/mymotifs.ii_lin_tested],
[' ',' '],
['P(PV-PV) one chemical with electrical', mymotifs.ii_c1e_found/mymotifs.ii_c1e_tested],
['P(PV-PV) bidirectional chemical with electrical', mymotifs.ii_c2e_found/mymotifs.ii_c2e_tested],
[' ',' '],
['PV-GC chemical synapses', mymotifs.ie_found],
['GC-PC chemical synapses', mymotifs.ei_found],
[' ',' '],
['P(PV-GC) chemical synapse',mymotifs.ie_found/mymotifs.ie_tested],
['P(GC-PC) chemical synapse', mymotifs.ei_found/mymotifs.ei_tested],
[' ',' '],
]
table = AsciiTable(info)
print (table.table)